<?php

	// +----------------------------------------------------------------------
	// | 广告
	// +----------------------------------------------------------------------
	// | Copyright (c) 2015-2024 http://www.yicmf.com, All rights reserved.
	// +----------------------------------------------------------------------
	// | Author: 微尘 <yicmf@qq.com>
	// +----------------------------------------------------------------------

	namespace app\model\cms;

	use app\model\file\Image;
	use think\facade\Cache;
	use think\facade\Config;
	use think\facade\Env;
	use think\View;
	use think\Container;

	class Advertising extends Common
	{

		//广告类型0静态展示1跳转商品2调整商铺3跳转文章
		public static $type_list = [
			'none'=>'静态展示',
			'article'=>'跳转文章',
//			'point_store'=>'跳转积分商城',
		];

		public function image()
		{
			return $this->belongsTo(Image::class)->field('id,save_name,url,save_path,driver');
		}

		/**
		 * 广告位
		 * @author  : 微尘 <yicmf@qq.com>
		 * @datetime: 2019/1/21 13:52
		 */
		public function space()
		{
			return $this->belongsTo(AdvertisingSpace::class);
		}
	}
